home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / gengetopt-2.6.lha / gengetopt-2.6 / configure.in < prev    next >
Text File  |  2001-12-31  |  3KB  |  105 lines

  1. # Copyright (C) 1999, 2000, 2001  Free Software Foundation, Inc.
  2. #  
  3. # This file is part of GNU gengetopt 
  4. #
  5. # GNU gengetopt is free software; you can redistribute it and/or modify 
  6. # it under the terms of the GNU General Public License as published by 
  7. # the Free Software Foundation; either version 2, or (at your option) 
  8. # any later version. 
  9. #
  10. # GNU gengetopt is distributed in the hope that it will be useful, but 
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of 
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  13. # Public License for more details. 
  14. #
  15. # You should have received a copy of the GNU General Public License along 
  16. # with gengetopt; see the file COPYING. If not, write to the Free Software 
  17. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
  18.  
  19. dnl Process this file with autoconf to produce a configure script.
  20. AC_INIT(reconf)
  21.  
  22. AM_CONFIG_HEADER(config.h)
  23.  
  24. AM_INIT_AUTOMAKE(gengetopt,2.6)
  25.  
  26. dnl directory for docs (html)
  27. AC_SUBST(gengetoptdocdir)
  28. gengetoptdocdir=$datadir/doc/gengetopt
  29.  
  30. dnl directory for examples
  31. AC_SUBST(gengetoptexamplesdir)
  32. gengetoptexamplesdir=$gengetoptdocdir/examples
  33.  
  34. dnl Checks for C compiler.
  35. AC_PROG_CC
  36.  
  37. dnl add options for non GNU compilers
  38. AC_NONGNU_FLAGS
  39.  
  40. dnl Checks for typedefs, structures, and compiler characteristics.
  41. AC_C_CONST
  42. AC_TYPE_SIZE_T
  43.  
  44. dnl Checks for C++ compiler.
  45. AC_PROG_CXX
  46.  
  47. dnl test for --enable-warnings command line option
  48. AC_ARG_ENABLE( warnings, [  --enable-warnings       enable compiler warnings], AC_COMPILE_WARNINGS )
  49.  
  50. dnl for executable extensions
  51. AC_EXEEXT
  52.  
  53. dnl for txtc (Text-to-C compiler)
  54. AC_PROG_AWK
  55. LF_PROG_TXTC
  56.  
  57. dnl for yacc or bison
  58. AC_PROG_YACC
  59.  
  60. dnl set some flags for yacc to generate header file
  61. AC_SUBST(YFLAGS)dnl
  62. YFLAGS="$YFLAGS -d"
  63.  
  64. dnl for lex or flex
  65. AM_PROG_LEX
  66.  
  67. dnl Checks for libraries.
  68. dnl Replace `main' with a function in -lfl:
  69. AC_CHECK_LIB(fl, main)
  70.  
  71. dnl if (f)lex library is not present (yywrap won't be found) we provide
  72. dnl a simple implementation (see yywrap.cc) which will be included in
  73. dnl LIBOBJS and linked against the program (see src/Makefile.am)
  74. dnl this works with flex generated files (I don't know about others)
  75. AC_REPLACE_FUNCS(yywrap)
  76.  
  77. dnl Checks for header files.
  78. AC_HEADER_STDC
  79. AC_CHECK_HEADERS(malloc.h strings.h unistd.h)
  80.  
  81. dnl Checks for typedefs, structures, and compiler characteristics.
  82. AC_C_CONST
  83.  
  84. dnl Checks for library functions.
  85. AC_REPLACE_FUNCS(strdup)
  86.  
  87. dnl check for getopt in standard library
  88. AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) 
  89.  
  90. AC_PATH_PROGS(TAR, tar gtar)
  91.  
  92. dnl this is only for developers who change doc/sample1.ggo file
  93. dnl GNU cpp2html can be found at http://www.gnu.org/software/cpp2html
  94. AC_PATH_PROGS(CPP2HTML, cpp2html)
  95.  
  96. AM_CONDITIONAL(NO_GETOPTLONG, test "$ac_cv_func_getopt_long" = no  )
  97. AM_CONDITIONAL(NO_STRDUP, test "$ac_cv_func_strdup" = no )
  98. AM_CONDITIONAL(NO_CPP2HTML, test -z "$ac_cv_path_CPP2HTML" )
  99.  
  100. AC_OUTPUT([Makefile txtc.sh src/Makefile doc/Makefile doc/gengetopt.1 
  101.            doc/gengetopt.html tests/Makefile tests/no_optgiven.sh
  102.            tests/more_than_once.sh],
  103.           [chmod +x tests/no_optgiven.sh
  104.            chmod +x tests/more_than_once.sh])
  105.